projects
/
project
/
firewall4.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4ead2a6
)
fw4.uc: filter duplicates in fw4.set
author
Stijn Tintel
<
[email protected]
>
Thu, 6 Jan 2022 11:12:37 +0000
(13:12 +0200)
committer
Stijn Tintel
<
[email protected]
>
Thu, 6 Jan 2022 12:48:56 +0000
(14:48 +0200)
Suggested-by: Jo-Philipp Wich <
[email protected]
>
Signed-off-by: Stijn Tintel <
[email protected]
>
Reviewed-by: Jo-Philipp Wich <
[email protected]
>
root/usr/share/ucode/fw4.uc
patch
|
blob
|
history
diff --git
a/root/usr/share/ucode/fw4.uc
b/root/usr/share/ucode/fw4.uc
index c07b35567aaa5157f0302fb4f797c9a533499248..747250963bdf2e6c4dd7755e7bae13e878102084 100644
(file)
--- a/
root/usr/share/ucode/fw4.uc
+++ b/
root/usr/share/ucode/fw4.uc
@@
-1405,7
+1405,9
@@
return {
},
set: function(v, force) {
- v = to_array(v);
+ let seen = {};
+
+ v = filter(to_array(v), item => !seen[item]++);
if (force || length(v) != 1)
return sprintf('{ %s }', join(', ', map(v, this.quote)));